<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
SpearmansCorrelation (Commons Math 3.2 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="SpearmansCorrelation (Commons Math 3.2 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SpearmansCorrelation.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/correlation/PearsonsCorrelation.html" title="class in org.apache.commons.math3.stat.correlation"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/correlation/StorelessCovariance.html" title="class in org.apache.commons.math3.stat.correlation"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?org/apache/commons/math3/stat/correlation/SpearmansCorrelation.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SpearmansCorrelation.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.math3.stat.correlation</FONT>
<BR>
Class SpearmansCorrelation</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.math3.stat.correlation.SpearmansCorrelation</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>SpearmansCorrelation</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>

<P>
Spearman's rank correlation. This implementation performs a rank
 transformation on the input data and then computes <A HREF="../../../../../../org/apache/commons/math3/stat/correlation/PearsonsCorrelation.html" title="class in org.apache.commons.math3.stat.correlation"><CODE>PearsonsCorrelation</CODE></A>
 on the ranked data.
 <p>
 By default, ranks are computed using <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html" title="class in org.apache.commons.math3.stat.ranking"><CODE>NaturalRanking</CODE></A> with default
 strategies for handling NaNs and ties in the data (NaNs maximal, ties averaged).
 The ranking algorithm can be set using a constructor argument.
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>2.0</DD>
<DT><B>Version:</B></DT>
  <DD>$Id: SpearmansCorrelation.java 1461822 2013-03-27 19:44:22Z tn $</DD>
</DL>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/correlation/SpearmansCorrelation.html#SpearmansCorrelation()">SpearmansCorrelation</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a SpearmansCorrelation without data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/correlation/SpearmansCorrelation.html#SpearmansCorrelation(org.apache.commons.math3.stat.ranking.RankingAlgorithm)">SpearmansCorrelation</A></B>(<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/RankingAlgorithm.html" title="interface in org.apache.commons.math3.stat.ranking">RankingAlgorithm</A>&nbsp;rankingAlgorithm)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a SpearmansCorrelation with the given ranking algorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/correlation/SpearmansCorrelation.html#SpearmansCorrelation(org.apache.commons.math3.linear.RealMatrix)">SpearmansCorrelation</A></B>(<A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A>&nbsp;dataMatrix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a SpearmansCorrelation from the given data matrix.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/correlation/SpearmansCorrelation.html#SpearmansCorrelation(org.apache.commons.math3.linear.RealMatrix, org.apache.commons.math3.stat.ranking.RankingAlgorithm)">SpearmansCorrelation</A></B>(<A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A>&nbsp;dataMatrix,
                     <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/RankingAlgorithm.html" title="interface in org.apache.commons.math3.stat.ranking">RankingAlgorithm</A>&nbsp;rankingAlgorithm)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a SpearmansCorrelation with the given input data matrix
 and ranking algorithm.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/correlation/SpearmansCorrelation.html#computeCorrelationMatrix(double[][])">computeCorrelationMatrix</A></B>(double[][]&nbsp;matrix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes the Spearman's rank correlation matrix for the columns of the
 input rectangular array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/correlation/SpearmansCorrelation.html#computeCorrelationMatrix(org.apache.commons.math3.linear.RealMatrix)">computeCorrelationMatrix</A></B>(<A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A>&nbsp;matrix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes the Spearman's rank correlation matrix for the columns of the
 input matrix.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/correlation/SpearmansCorrelation.html#correlation(double[], double[])">correlation</A></B>(double[]&nbsp;xArray,
            double[]&nbsp;yArray)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes the Spearman's rank correlation coefficient between the two arrays.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/correlation/SpearmansCorrelation.html#getCorrelationMatrix()">getCorrelationMatrix</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculate the Spearman Rank Correlation Matrix.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/correlation/PearsonsCorrelation.html" title="class in org.apache.commons.math3.stat.correlation">PearsonsCorrelation</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/stat/correlation/SpearmansCorrelation.html#getRankCorrelation()">getRankCorrelation</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <A HREF="../../../../../../org/apache/commons/math3/stat/correlation/PearsonsCorrelation.html" title="class in org.apache.commons.math3.stat.correlation"><CODE>PearsonsCorrelation</CODE></A> instance constructed from the
 ranked input data.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="SpearmansCorrelation()"><!-- --></A><H3>
SpearmansCorrelation</H3>
<PRE>
public <B>SpearmansCorrelation</B>()</PRE>
<DL>
<DD>Create a SpearmansCorrelation without data.
<P>
</DL>
<HR>

<A NAME="SpearmansCorrelation(org.apache.commons.math3.stat.ranking.RankingAlgorithm)"><!-- --></A><H3>
SpearmansCorrelation</H3>
<PRE>
public <B>SpearmansCorrelation</B>(<A HREF="../../../../../../org/apache/commons/math3/stat/ranking/RankingAlgorithm.html" title="interface in org.apache.commons.math3.stat.ranking">RankingAlgorithm</A>&nbsp;rankingAlgorithm)</PRE>
<DL>
<DD>Create a SpearmansCorrelation with the given ranking algorithm.
 <p>
 From version 4.0 onwards this constructor will throw an exception
 if the provided <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html" title="class in org.apache.commons.math3.stat.ranking"><CODE>NaturalRanking</CODE></A> uses a <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html#REMOVED"><CODE>NaNStrategy.REMOVED</CODE></A> strategy.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>rankingAlgorithm</CODE> - ranking algorithm<DT><B>Since:</B></DT>
  <DD>3.1</DD>
</DL>
</DL>
<HR>

<A NAME="SpearmansCorrelation(org.apache.commons.math3.linear.RealMatrix)"><!-- --></A><H3>
SpearmansCorrelation</H3>
<PRE>
public <B>SpearmansCorrelation</B>(<A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A>&nbsp;dataMatrix)</PRE>
<DL>
<DD>Create a SpearmansCorrelation from the given data matrix.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>dataMatrix</CODE> - matrix of data with columns representing
 variables to correlate</DL>
</DL>
<HR>

<A NAME="SpearmansCorrelation(org.apache.commons.math3.linear.RealMatrix, org.apache.commons.math3.stat.ranking.RankingAlgorithm)"><!-- --></A><H3>
SpearmansCorrelation</H3>
<PRE>
public <B>SpearmansCorrelation</B>(<A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A>&nbsp;dataMatrix,
                            <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/RankingAlgorithm.html" title="interface in org.apache.commons.math3.stat.ranking">RankingAlgorithm</A>&nbsp;rankingAlgorithm)</PRE>
<DL>
<DD>Create a SpearmansCorrelation with the given input data matrix
 and ranking algorithm.
 <p>
 From version 4.0 onwards this constructor will throw an exception
 if the provided <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaturalRanking.html" title="class in org.apache.commons.math3.stat.ranking"><CODE>NaturalRanking</CODE></A> uses a <A HREF="../../../../../../org/apache/commons/math3/stat/ranking/NaNStrategy.html#REMOVED"><CODE>NaNStrategy.REMOVED</CODE></A> strategy.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>dataMatrix</CODE> - matrix of data with columns representing
 variables to correlate<DD><CODE>rankingAlgorithm</CODE> - ranking algorithm</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getCorrelationMatrix()"><!-- --></A><H3>
getCorrelationMatrix</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A> <B>getCorrelationMatrix</B>()</PRE>
<DL>
<DD>Calculate the Spearman Rank Correlation Matrix.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>Spearman Rank Correlation Matrix</DL>
</DD>
</DL>
<HR>

<A NAME="getRankCorrelation()"><!-- --></A><H3>
getRankCorrelation</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/stat/correlation/PearsonsCorrelation.html" title="class in org.apache.commons.math3.stat.correlation">PearsonsCorrelation</A> <B>getRankCorrelation</B>()</PRE>
<DL>
<DD>Returns a <A HREF="../../../../../../org/apache/commons/math3/stat/correlation/PearsonsCorrelation.html" title="class in org.apache.commons.math3.stat.correlation"><CODE>PearsonsCorrelation</CODE></A> instance constructed from the
 ranked input data. That is,
 <code>new SpearmansCorrelation(matrix).getRankCorrelation()</code>
 is equivalent to
 <code>new PearsonsCorrelation(rankTransform(matrix))</code> where
 <code>rankTransform(matrix)</code> is the result of applying the
 configured <code>RankingAlgorithm</code> to each of the columns of
 <code>matrix.</code>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>PearsonsCorrelation among ranked column data</DL>
</DD>
</DL>
<HR>

<A NAME="computeCorrelationMatrix(org.apache.commons.math3.linear.RealMatrix)"><!-- --></A><H3>
computeCorrelationMatrix</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A> <B>computeCorrelationMatrix</B>(<A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A>&nbsp;matrix)</PRE>
<DL>
<DD>Computes the Spearman's rank correlation matrix for the columns of the
 input matrix.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>matrix</CODE> - matrix with columns representing variables to correlate
<DT><B>Returns:</B><DD>correlation matrix</DL>
</DD>
</DL>
<HR>

<A NAME="computeCorrelationMatrix(double[][])"><!-- --></A><H3>
computeCorrelationMatrix</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/linear/RealMatrix.html" title="interface in org.apache.commons.math3.linear">RealMatrix</A> <B>computeCorrelationMatrix</B>(double[][]&nbsp;matrix)</PRE>
<DL>
<DD>Computes the Spearman's rank correlation matrix for the columns of the
 input rectangular array.  The columns of the array represent values
 of variables to be correlated.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>matrix</CODE> - matrix with columns representing variables to correlate
<DT><B>Returns:</B><DD>correlation matrix</DL>
</DD>
</DL>
<HR>

<A NAME="correlation(double[], double[])"><!-- --></A><H3>
correlation</H3>
<PRE>
public double <B>correlation</B>(double[]&nbsp;xArray,
                          double[]&nbsp;yArray)</PRE>
<DL>
<DD>Computes the Spearman's rank correlation coefficient between the two arrays.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xArray</CODE> - first data array<DD><CODE>yArray</CODE> - second data array
<DT><B>Returns:</B><DD>Returns Spearman's rank correlation coefficient for the two arrays
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/commons/math3/exception/DimensionMismatchException.html" title="class in org.apache.commons.math3.exception">DimensionMismatchException</A></CODE> - if the arrays lengths do not match
<DD><CODE><A HREF="../../../../../../org/apache/commons/math3/exception/MathIllegalArgumentException.html" title="class in org.apache.commons.math3.exception">MathIllegalArgumentException</A></CODE> - if the array length is less than 2</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SpearmansCorrelation.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/correlation/PearsonsCorrelation.html" title="class in org.apache.commons.math3.stat.correlation"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/stat/correlation/StorelessCovariance.html" title="class in org.apache.commons.math3.stat.correlation"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?org/apache/commons/math3/stat/correlation/SpearmansCorrelation.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SpearmansCorrelation.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2003-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
